<template>
  <!-- 主播电台的轮播图不同导航选中时的页面，根据id显示 -->
  <div class="category">
    <!-- 优秀新电台 -->
    <div class="good-dj">
      <div class="title">
        <div class="left">
          <a href="javascript:;">优秀新电台</a>
        </div>
      </div>
      <ul class="content">
        <li v-for="i,index in 5" :key="index">
          <div class="img">
            <img src="./img/1.jpg">
          </div>
          <p>平凡的时间里</p>
          <p>记录细碎过往和微小爱意</p>
        </li>
      </ul>
    </div>
    <!-- 电台排行榜 -->
    <div class="dj-list">
      <!-- 标题 -->
      <div class="title">
          <div class="left">
              <a href="javascript:;">电台排行榜</a>
          </div>
          <div class="right">
            <span>上升最快</span>
            <span>|</span>
            <span>最热电台</span>
          </div>
      </div>
      <!-- 内容 -->
      <div class="content">
          <!-- 每一项 -->
          <div class="item" v-for="i,index in 22" :key="index">
              <div class="img">
                  <img src="./img/1.jpg">
              </div>
              <div class="info">
                  <p>魔法电台-音乐时间</p>
                  <p>
                    <i class="icon"></i>
                    <span>甜心小林</span>
                  </p>
                  <p>共1期&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;订阅915次</p>
              </div>
          </div>
      </div>
      <!-- 分页器 -->
      <pager
        :currentPage="currentPage"
        pageSize="25"
        :pageGroup="7"
        total="300"
        @getCurrentPage="getCurrentPage"
      ></pager>
    </div>
  </div>
</template>

<script>
import pager from '@/components/pager'
export default {
  name: "category",
  components:{pager},
  data(){
      return{
        currentPage:1
      }
  },
  methods:{
    // 分页器当前页码
    getCurrentPage(page){
    this.currentPage = page
    }
  }
};
</script>

<style lang="scss" scoped>
.category {
  width: 100%;
  font-size: 12px;
  color: #333;
  .good-dj {
    .title {
      width: 100%;
      height: 40px;
      line-height: 42px;
      border-bottom: 2px solid #c20c0c;
      .left {
        font-size: 24px;
        a {
          color: #333;
        }
      }
    }
    .content{
      width: 100%;
      height: 220px;
      display: flex;
      justify-content: space-between;
      li{
        width: 150px;
        margin-top: 15px;
        .img{
          width: 150px;
          height: 150px;
          img{
            width: 100%;
            height: 100%;
            cursor: pointer;
          }
        }
        p{
          line-height: 24px;
        }
        p:nth-child(2){
          color: #333;
          font-size: 14px;
          cursor: pointer;
          margin-top: 5px;
          &:hover{
            text-decoration: underline;
          }
        }
        p:nth-child(3){
          color: #999;
          font-size: 12px;
        }
      }
    }
  }
  .dj-list{
    width: 100%;
    font-size: 12px;
    color: #333;
    .title{
        width: 100%;
        height: 40px;
        margin-top: 40px;
        line-height: 42px;
        border-bottom: 2px solid #c20c0c;
        .left{
            float: left;
            font-size: 24px;
            a{
                color: #333;
            }
        }
        .right{
            float: right;
            color: #666;
            cursor: pointer;
            &:hover{
                text-decoration: underline;
            }
            span:nth-child(2){
              margin: 0 10px;
              color: #c7c7c7;
            }
        }
    }
    .content{
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2,1fr);
        grid-template-rows: repeat(11,1fr);
        align-items: center;
        .item{
            width: 435px;
            height: 120px;
            padding: 20px 0;
            display: flex;
            border-bottom: 1px solid #e7e7e7;
            .img{
                width: 120px;
                height: 120px;
                cursor: pointer;
                img{
                    width: 100%;
                    height: 100%;
                }
            }
            .info{
                margin-left: 20px;
                p:nth-child(1){
                    font-size: 18px;
                    color: #000;
                    font-weight: bold;
                    margin-top: 20px;
                    cursor: pointer;
                    &:hover{
                        text-decoration: underline;
                    }
                }
                p:nth-child(2){
                    font-size: 12px;
                    color: #333;
                    margin-top: 30px;
                    i{
                      display: inline-block;
                      width: 14px;
                      height: 15px;
                      background: url('@/assets/icon.png') no-repeat;
                      background-position: -50px -300px;
                      vertical-align: middle;
                      margin-right: 10px;
                    }
                    span:hover{
                      text-decoration: underline;
                    }
                }
                p:nth-child(3){
                    font-size: 12px;
                    color: #999;
                    margin-top: 10px;
                }
            }
        }
    }
  }
}
</style>